# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=py3-iso639-lang
pkgver=2.2.3
pkgrel=0
pkgdesc="Easy-to-use library for the ISO 639 language representation standards"
url="https://github.com/LBeaudoux/iso639"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="py3-iso639-lang-$pkgver.tar.gz::https://github.com/LBeaudoux/iso639/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/iso639-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest test.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
4846c73b9a8f7e6e5d258c7408f6c4a7eb64ed0b64733f813cbf4e4945acaac55075a5030541629dafce0bc20c98eb1a7fac82c39f96c12309d096e9ef42e629  py3-iso639-lang-2.2.3.tar.gz
"
